#include <stdio.h>
//12321

int main()
{
	int n=0;
	int a,b,c,d,e;
	scanf("%d",&n);
	a=n/10000;
	b=(n%10000)/1000;
	c=(n%1000)/100;
	d=(n%100)/10;
	e=n%10;
	if(a==e&&b==d)
	printf("是回文数");
	else
	printf("不是回文数");
//	printf("%d %d %d %d %d",a,b,c,d,e);
	return 0;
}